package com.service;


import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@RabbitListener(queues = {"topicQueue2"})
@Component
public class MQListener2 {

    @RabbitHandler
    public void recv(String message)
    {
        System.out.println("队列topicQueue-2 收到消息:"+message);
    }
}
